#! /usr/bin/python3

with open('/dev/mock-pedal', 'r') as f:
    print('pedal pressed')
    input('press enter to release ...')

print('pedal released')

